package broadcast;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.example.administrator.newxlmedical.StartActivity;

public class BootBroadcastReceive extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        //start activity
        String action="android.intent.action.MAIN";
        String category="android.intent.category.LAUNCHER";
        Intent myi=new Intent(context,StartActivity.class);
        myi.setAction(action);
        myi.addCategory(category);
        myi.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(myi);
    }
}
